#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;

int main()
{
	std::srand(std::time(0));
	int n = 50;
	int a[n+1];
	for (int i = 1; i <= n; i++) a[i] = i;
	std::cout << n << '\n';
	for (int i = 0 ; i < 100; i++) {
		int p1 = rand() % n + 1;
		int p2 = rand() % n + 1;
		std::swap(a[p1], a[p2]);
	}

	std::cout << a[1];
	for (int i = 2; i <= n; i++)
		std::cout << " " << a[i];
	std::cout << '\n';
}

